const audio = uni.createInnerAudioContext();

const audioMap = {
  // 正确
  correct:
    "https://hengxiao-resource.oss-cn-hangzhou.aliyuncs.com/web/resources/audio/correct.MP3",
  // 错误
  error:
    "https://hengxiao-resource.oss-cn-hangzhou.aliyuncs.com/web/resources/audio/error.MP3",
  // 点击错误
  clickError:
    "https://hengxiao-resource.oss-cn-hangzhou.aliyuncs.com/web/resources/audio/clickError.MP3",
};

export const playBgAudio = (type = "1") => {
  audio.src = audioMap[type];
  audio.play();
};
